<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CommonController extends Controller
{
    /** 图片上传 */
    public function uploadImage(Request $request)
    {
        $file = $request->file('file');

        $res = $this->upload($file);
        if($res){
            return $this->data(['src'=>$res['url']]);
        }
    }
}
